﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PictrueSimpleSyndication
{
    public class PointEx
    {
        public static Point PointSum(Point p1, params Point[] plist)
        {
            int x = p1.X, y = p1.Y;

            foreach (var item in plist)
            {
                x += item.X;
                y += item.Y;
            }

            return new Point(x, y);
        }

        public static Point PointSub(Point p1, params Point[] plist)
        {
            int x = p1.X, y = p1.Y;

            foreach (var item in plist)
            {
                x -= item.X;
                y -= item.Y;
            }

            return new Point(x, y);
        }
    }
}
